<template>
	<view class="music-head">
		<view v-if="icon" class="music-head-icon">
			<span class="iconfont" @tap="handleToBack">&#xe60c;</span> | <span class="iconfont"  @tap="handleToHome">&#xe639;</span>
			
		</view>
		
			{{title}}
	
		
	</view>
</template>

<script>
	import"@/common/iconfont.css"
	export default {
		name:"music-head",
		data() {
			return {
				
			};
		},
		methods:{
			//跳回上一级
			handleToBack(){
				uni.navigateBack();
				//返回上一级
				console.log("返回上一级")
			},
			//返回首页
			handleToHome(){
				uni.navigateTo({
					url:'/pages/index/index'
				})
					console.log("返回首页")
			}
		},
		props:['title','icon']
	}
</script>

<style>
	.music-head{width: 100%;height: 75px;font-size: 16px;line-height: 80px;text-align: center;color: black;position: relative;}
	.music-head-icon{position: absolute; left: 8px;top: 33px; width: 90px;
	height: 30px;
	background: rgba(0,0,0,0.4);color: white;
	line-height: 31px;border-radius: 15px;display: flex;justify-content: space-evenly;}
</style>